Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

types.h

Go to the documentation of this file.
00001 /* -*- c -*- */
00002 #ifndef INCLUDED_LIB3DS_TYPES_H
00003 #define INCLUDED_LIB3DS_TYPES_H
00004 /*
00005  * The 3D Studio File Format Library
00006  * Copyright (C) 1996-2001 by J.E. Hoffmann <je-h@gmx.net>
00007  * All rights reserved.
00008  *
00009  * This program is  free  software;  you can redistribute it and/or modify it
00010  * under the terms of the  GNU Lesser General Public License  as published by 
00011  * the  Free Software Foundation;  either version 2.1 of the License,  or (at 
00012  * your option) any later version.
00013  *
00014  * This  program  is  distributed in  the  hope that it will  be useful,  but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00016  * or  FITNESS FOR A  PARTICULAR PURPOSE.  See the  GNU Lesser General Public  
00017  * License for more details.
00018  *
00019  * You should  have received  a copy of the GNU Lesser General Public License
00020  * along with  this program;  if not, write to the  Free Software Foundation,
00021  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00022  *
00023  * $Id: types.h,v 1.1 2005/03/07 11:16:26 Assassin Exp $
00024  */
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 #if defined (_LIB3DS_DLL) && defined(_WIN32) && (!defined(__GNUC__))
00030 #ifdef LIB3DS_EXPORT
00031 #define LIB3DSAPI __declspec(dllexport)
00032 #else               
00033 #define LIB3DSAPI __declspec(dllimport)
00034 #endif           
00035 #else
00036 #define LIB3DSAPI
00037 #endif
00038 
00039 #define LIB3DS_TRUE 1
00040 #define LIB3DS_FALSE 0
00041 
00042 typedef int Lib3dsBool;
00043 typedef unsigned char Lib3dsByte;
00044 typedef unsigned short int Lib3dsWord;
00045 typedef unsigned long Lib3dsDword;
00046 typedef signed char Lib3dsIntb;
00047 typedef signed short int Lib3dsIntw;
00048 typedef signed long Lib3dsIntd;
00049 typedef float Lib3dsFloat;
00050 typedef double Lib3dsDouble;
00051 
00052 typedef float Lib3dsVector[3];
00053 typedef float Lib3dsTexel[2];
00054 typedef float Lib3dsQuat[4];
00055 typedef float Lib3dsMatrix[4][4];
00056 typedef float Lib3dsRgb[3];
00057 typedef float Lib3dsRgba[4];
00058 
00059 #define LIB3DS_EPSILON (1e-8)
00060 #define LIB3DS_PI 3.14159265358979323846
00061 #define LIB3DS_TWOPI (2.0*LIB3DS_PI)
00062 #define LIB3DS_HALFPI (LIB3DS_PI/2.0)
00063 #define LIB3DS_DEG(x) ((180.0/LIB3DS_PI)*(x))
00064 #define LIB3DS_RAD(x) ((LIB3DS_PI/180.0)*(x))
00065   
00066 #ifndef INCLUDED_STDIO_H
00067 #define INCLUDED_STDIO_H
00068 #include <stdio.h>
00069 #endif
00070 
00071 #ifdef _DEBUG
00072   #ifndef ASSERT
00073   #include <assert.h>
00074   #define ASSERT(__expr) assert(__expr)
00075   #endif
00076   #define LIB3DS_ERROR_LOG \
00077     {printf("\t***LIB3DS_ERROR_LOG*** %s : %d\n", __FILE__, __LINE__);}
00078 #else 
00079   #ifndef ASSERT
00080   #define ASSERT(__expr)
00081   #endif
00082   #define LIB3DS_ERROR_LOG
00083 #endif
00084 
00085 typedef struct _Lib3dsIo Lib3dsIo;
00086 typedef struct _Lib3dsFile Lib3dsFile;
00087 typedef struct _Lib3dsBackground Lib3dsBackground;
00088 typedef struct _Lib3dsAtmosphere Lib3dsAtmosphere;
00089 typedef struct _Lib3dsShadow Lib3dsShadow;
00090 typedef struct _Lib3dsViewport Lib3dsViewport;
00091 typedef struct _Lib3dsMaterial Lib3dsMaterial;
00092 typedef struct _Lib3dsFace Lib3dsFace; 
00093 typedef struct _Lib3dsBoxMap Lib3dsBoxMap; 
00094 typedef struct _Lib3dsMapData Lib3dsMapData; 
00095 typedef struct _Lib3dsMesh Lib3dsMesh;
00096 typedef struct _Lib3dsCamera Lib3dsCamera;
00097 typedef struct _Lib3dsLight Lib3dsLight;
00098 typedef struct _Lib3dsBoolKey Lib3dsBoolKey;
00099 typedef struct _Lib3dsBoolTrack Lib3dsBoolTrack;
00100 typedef struct _Lib3dsLin1Key Lib3dsLin1Key;
00101 typedef struct _Lib3dsLin1Track Lib3dsLin1Track;
00102 typedef struct _Lib3dsLin3Key Lib3dsLin3Key;
00103 typedef struct _Lib3dsLin3Track Lib3dsLin3Track;
00104 typedef struct _Lib3dsQuatKey Lib3dsQuatKey;
00105 typedef struct _Lib3dsQuatTrack Lib3dsQuatTrack;
00106 typedef struct _Lib3dsMorphKey Lib3dsMorphKey;
00107 typedef struct _Lib3dsMorphTrack Lib3dsMorphTrack;
00108 
00109 typedef enum _Lib3dsNodeTypes {
00110   LIB3DS_UNKNOWN_NODE =0,
00111   LIB3DS_AMBIENT_NODE =1,
00112   LIB3DS_OBJECT_NODE  =2,
00113   LIB3DS_CAMERA_NODE  =3,
00114   LIB3DS_TARGET_NODE  =4,
00115   LIB3DS_LIGHT_NODE   =5,
00116   LIB3DS_SPOT_NODE    =6
00117 } Lib3dsNodeTypes;
00118 
00119 typedef struct _Lib3dsNode Lib3dsNode;
00120 
00121 typedef union _Lib3dsUserData {
00122     void *p;
00123     Lib3dsIntd i;
00124     Lib3dsDword d;
00125     Lib3dsFloat f;
00126     Lib3dsMaterial *material;
00127     Lib3dsMesh *mesh;
00128     Lib3dsCamera *camera;
00129     Lib3dsLight *light;
00130     Lib3dsNode *node;
00131 } Lib3dsUserData;
00132 
00133 #ifdef __cplusplus
00134 };
00135 #endif
00136 #endif
00137 
00138 
00139 
00140 
00141 
00142 
00143 
00144 
00145 

Generated on Mon Sep 12 19:58:58 2005 for Destiny3D by doxygen1.3-rc3